#!/usr/bin/env python
# encoding: utf-8
'''
@author: zhaowenpeng
@contact: winston@peipeiyun.com
@software: garner
@file: baseservices.py
@time: 2020/8/21 上午11:11
@desc:
'''

from core.wapper import apply
from core.g import G

@apply(g=G.getInstance())
class BaseService(object):
    @property
    def session(self):
        return self.g.session

    @property
    def client(self):
        return self.g.mongo

    @property
    def utils(self):
        return self.g.utils

    @property
    def redis(self):
        return self.g.redis

    @property
    def conf(self):
        return self.g.conf
